//定义商品详情页封装的数据模型
export class DetailsInfo {
  constructor(itemInfo, columns, services) {
    //标题
    this.title = itemInfo.title;
    this.desc = itemInfo.desc;
    //现价
    this.newPrice = itemInfo.price;
    //原价
    this.oldPrice = itemInfo.oldPrice;
    //折扣
    this.discountDesc = itemInfo.discountDesc;

    //销售,收藏,默认快递
    this.columns = columns;

    this.services = services;

    //真实价格
    this.realPrice = itemInfo.lowNowPrice

  }
}

//定义商品详情页面的店铺信息
export class ShopInfo {
  constructor(shopInfo) {
    this.logo = shopInfo.shopLogo;
    this.name = shopInfo.name;
    this.fans = shopInfo.cFans;
    this.sells = shopInfo.cSells;
    this.score = shopInfo.score;
    this.goodsCount = shopInfo.cGoods
  }
}
